home *** CD-ROM | disk | FTP | other *** search
/ Group 42-Sells Out! - The Information Archive / Group 42 Sells Out (Group 42) (1996).iso / faqs / cssniff.txt < prev    next >
Text File  |  1995-11-30  |  19KB  |  462 lines

  1. Archive-name: computer-security/sniffers
  2. Posting-frequency: monthly
  3. Last-modified: 1995/5/04
  4. Version: 2.00
  5.  
  6. Sniffer FAQ
  7.  
  8. Version: 1.7
  9. -------------------------------------------------------------------------------
  10. This Security FAQ is a resource provided by:
  11.  
  12.      Internet Security Systems, Inc.
  13.      2000 Miller Court West            Tel: (770) 441-2531
  14.      Norcross, Georgia  30071          Fax: (770) 441-2431
  15.  
  16.      - Internet Scanner ... the most comprehensive "attack simulator"
  17.      available. -
  18.  
  19. -------------------------------------------------------------------------------
  20. To get the newest updates of Security files check the following services:
  21.  
  22.      mail info@iss.net with "send index" in message
  23.      http://iss.net/
  24.      ftp iss.net /pub/
  25.  
  26. -------------------------------------------------------------------------------
  27. This Sniffer FAQ will hopefully give administrators a clear understanding of
  28. sniffing problems and hopefully possible solutions to follow up with. Sniffers
  29. is one of the main causes of mass break-ins on the Internet today.
  30.  
  31. This FAQ will be broken down into:
  32.  
  33.    *  What a sniffer is and how it works
  34.    *  Where are sniffers available
  35.    *  How to detect if a machine is being sniffed
  36.    *  Stopping sniffing attacks:
  37.         o  Active hubs
  38.         o  Encryption
  39.         o  Kerberos
  40.         o  One-time password technology
  41.         o  Non-promiscuous interfaces
  42.  
  43. -------------------------------------------------------------------------------
  44.  
  45. What a sniffer is and how it works
  46.  
  47. Unlike telephone circuits, computer networks are shared communication channels.
  48. It is simply too expensive to dedicate local loops to the switch (hub) for each
  49. pair of communicating computers. Sharing means that computers can receive
  50. information that was intended for other machines. To capture the information
  51. going over the network is called sniffing.
  52.  
  53. Most popular way of connecting computers is through ethernet. Ethernet protocol
  54. works by sending packet information to all the hosts on the same circuit. The
  55. packet header contains the proper address of the destination machine. Only the
  56. machine with the matching address is suppose to accept the packet. A machine
  57. that is accepting all packets, no matter what the packet header says, is said
  58. to be in promiscuous mode.
  59.  
  60. Because, in a normal networking environment, account and password information
  61. is passed along ethernet in clear-text, it is not hard for an intruder once
  62. they obtain root to put a machine into promiscuous mode and by sniffing,
  63. compromise all the machines on the net.
  64.  
  65. -------------------------------------------------------------------------------
  66.  
  67. Where are sniffers available
  68.  
  69. Sniffing is one of the most popular forms of attacks used by hackers. One
  70. special sniffer, called Esniff.c, is very small, designed to work on Sunos, and
  71. only captures the first 300 bytes of all telnet, ftp, and rlogin sessions. It
  72. was published in Phrack, one of the most widely read freely available
  73. underground hacking magazines. You can find Phrack on many FTP sites. Esniff.c
  74. is also available on many FTP sites such as coombs.anu.edu.au:/pub/net/log.
  75.  
  76. You may want to run Esniff.c on an authorized network to quickly see how
  77. effective it is in compromising local machines.
  78.  
  79. Other sniffers that are widely available which are intended to debug network
  80. problems are:
  81.  
  82.    *  Etherfind on SunOs4.1.x
  83.    *  Snoop on Solaris 2.x and SunOs 4.1 (on ftp playground.sun.com)
  84.    *  Tcpdump 3.0 uses bpf for a multitude of platforms.
  85.    *  Packetman, Interman, Etherman, Loadman works on the following platforms:
  86.      SunOS, Dec-Mips, SGI, Alpha, and Solaris. It is available on
  87.      ftp.cs.curtin.edu.au:/pub/netman/[sun4c|dec-mips|sgi|alpha|solaris2]/
  88.      [etherman-1.1a|interman-1.1|loadman-1.0|packetman-1.1].tar.Z
  89.      Packetman was designed to capture packets, while Interman, Etherman, and
  90.      Loadman monitor traffic of various kinds.
  91.  
  92.      DOS based sniffers
  93.  
  94.    *  Gobbler for IBM DOS Machines
  95.    *  ethdump v1.03
  96.      Available on ftp
  97.      ftp.germany.eu.net:/pub/networking/inet/ethernet/ethdp103.zip
  98.    *  ethload v1.04
  99.      Companion utility to a ethernet monitor. Available on ftp
  100.      ftp.germany.eu.net:/pub/networking/monitoring/ethload/ethld104.zip
  101.  
  102. Commercial Sniffers are available at:
  103.  
  104.    *  Network General.
  105.  
  106.           Network General produces a number of products. The most
  107.           important are the Expert Sniffer, which not only sniffs on the
  108.           wire, but also runs the packet through a high-performance expert
  109.           system, diagnosing problems for you. There is an extension onto
  110.           this called the "Distributed Sniffer System" that allows you to
  111.           put the console to the expert sniffer on you Unix workstation
  112.           and to distribute the collection agents at remote sites.
  113.  
  114.    *  Microsoft's Net Monitor
  115.  
  116.           " My commercial site runs many protocols on one wire - NetBeui,
  117.           IPX/SPX, TCP/IP, 802.3 protocols of various flavors, most
  118.           notably SNA. This posed a big problem when trying to find a
  119.           sniffer to examine the network problems we were having, since I
  120.           found that some sniffers that understood Ethernet II parse out
  121.           some 802.3 traffic as bad packets, and vice versa. I found that
  122.           the best protocol parser was in Microsoft's Net Monitor product,
  123.           also known as Bloodhound in its earlier incarnations. It is able
  124.           to correctly identify such oddities as NetWare control packets,
  125.           NT NetBios name service broadcasts, etc, which etherfind on a
  126.           Sun simply registered as type 0000 packet broadcasts. It
  127.           requires MS Windows 3.1 and runs quite fast on a HP XP60 Pentium
  128.           box. Top level monitoring provides network statistics and
  129.           information on conversations by mac address (or hostname, if you
  130.           bother with an ethers file). Looking at tcpdump style details is
  131.           as simple as clicking on a conversation. The filter setup is
  132.           also one of the easiest to implement that I've seen, just click
  133.           in a dialog box on the hosts you want to monitor. The number of
  134.           bad packets it reports on my network is a tiny fraction of that
  135.           reported by other sniffers I've used. One of these other
  136.           sniffers in particular was reporting a large number of bad
  137.           packets with src mac addresses of aa:aa:aa:aa:aa:aa but I don't
  138.           see them at all using the MS product. - Anonymous
  139.  
  140. -------------------------------------------------------------------------------
  141.  
  142. How to detect a sniffer running.
  143.  
  144. To detect a sniffing device that only collects data and does not respond to any
  145. of the information, requires physically checking all your ethernet connections
  146. by walking around and checking the ethernet connections individually.
  147.  
  148. It is also impossible to remotely check by sending a packet or ping if a
  149. machine is sniffing.
  150.  
  151. A sniffer running on a machine puts the interface into promiscuous mode, which
  152. accepts all the packets. On some Unix boxes, it is possible to detect a
  153. promiscuous interface. It is possible to run a sniffer in non-promiscuous mode,
  154. but it will only capture sessions from the machine it is running on. It is also
  155. possible for the intruder to do similiar capture of sessions by trojaning many
  156. programs such as sh, telnet, rlogin, in.telnetd, and so on to write a log file
  157. of what the user did. They can easily watch the tty and kmem devices as well.
  158. These attacks will only compromise sessions coming from that one machine, while
  159. promiscuous sniffing compromises all sessions on the ethernet.
  160.  
  161. For SunOs, NetBSD, and other possible BSD derived Unix systems, there is a
  162. command
  163.  
  164.      "ifconfig -a"
  165.  
  166. that will tell you information about all the interfaces and if they are in
  167. promiscuous mode. DEC OSF/1 and IRIX and possible other OSes require the device
  168. to be specified. One way to find out what interface is on the system, you can
  169. execute:
  170.  
  171.      # netstat -r
  172.      Routing tables
  173.  
  174.      Internet:
  175.      Destination      Gateway            Flags     Refs     Use  Interface
  176.      default          iss.net            UG          1    24949  le0
  177.      localhost        localhost          UH          2       83  lo0
  178.  
  179. Then you can test for each interface by doing the following command:
  180.  
  181.      #ifconfig le0
  182.      le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,MULTICAST>
  183.              inet 127.0.0.1 netmask 0xffffff00 broadcast 255.0.0.1
  184.  
  185. Intruders often replace commands such as ifconfig to avoid detection. Make sure
  186. you verify its checksum.
  187.  
  188. There is a program called cpm available on ftp.cert.org:/pub/tools/cpm that
  189. only works on Sunos and is suppose to check the interface for promiscuous flag.
  190.  
  191. Ultrix can possibly detect someone running a sniffer by using the commands
  192. pfstat and pfconfig.
  193.  
  194. pfconfig allows you to set who can run a sniffer
  195. pfstat shows you if the interface is in promiscuous mode.
  196.  
  197. These commands only work if sniffing is enabled by linking it into the kernel.
  198. by default, the sniffer is not linked into the kernel. Most other Unix systems,
  199. such as Irix, Solaris, SCO, etc, do not have any flags indication whether they
  200. are in promiscuous mode or not, therefore an intruder could be sniffing your
  201. whole network and there is no way to detect it.
  202.  
  203. Often a sniffer log becomes so large that the file space is all used up. On a
  204. high volume network, a sniffer will create a large load on the machine. These
  205. sometimes trigger enough alarms that the administrator will discover a sniffer.
  206. I highly suggest using lsof (LiSt Open Files) available from
  207. coast.cs.purdue.edu:/pub/Purdue/lsof for finding log files and finding programs
  208. that are accessing the packet device such as /dev/nit on SunOs.
  209.  
  210. There is no commands I know of to detect a promiscuous IBM PC compatible
  211. machine, but they atleast usually do not allow command execution unless from
  212. the console, therefore remote intruders can not turn a PC machine into a
  213. sniffer without inside assistance.
  214.  
  215. -------------------------------------------------------------------------------
  216.  
  217. Stopping sniffing attacks
  218.  
  219. Active hubs send to each system only packets intended for it rendering
  220. promiscuous sniffing useless. This is only effective for 10-Base T.
  221.  
  222. The following vendors have available active hubs:
  223.  
  224.    *  3Com
  225.    *  HP
  226.  
  227. -------------------------------------------------------------------------------
  228.  
  229. Encryption
  230.  
  231. There are several packages out there that allow encryption between connections
  232. therefore an intruder could capture the data, but could not decypher it to make
  233. any use of it.
  234.  
  235. Some packages available are:
  236.  
  237.    *  deslogin is one package available at ftp
  238.      coast.cs.purdue.edu:/pub/tools/unix/deslogin .
  239.  
  240.    * swIPe is another package available at
  241.      ftp.csua.berkeley.edu:/pub/cypherpunks/swIPe/
  242.  
  243.    * Netlock encrypts all (tcp, udp, and raw ip based) communications
  244.      transparently. It has automatic (authenticated Diffie-Helman) distibuted
  245.      key management mechanism for each host and runs on the SUN 4.1 and HP 9.x
  246.      systems. The product comes with a Certification Authority Management
  247.      application which generates host certificates (X.509) used for
  248.      authentication between the hosts. and provides centralized control of each
  249.      Hosts communications rules.
  250.  
  251.      The product is built by Hughes Aircraft and they can be reached at
  252.      800-825-LOCK or email at netlock@mls.hac.com.
  253.  
  254. -------------------------------------------------------------------------------
  255.  
  256. Kerberos
  257.  
  258. Kerberos is another package that encrypts account information going over the
  259. network. Some of its draw backs are that all the account information is held on
  260. one host and if that machine is compromised, the whole network is vulnerable.
  261. It is has been reported a major difficulty to set up. Kerberos comes with a
  262. stream-encrypting rlogind, and stream-encrypting telnetd is available. This
  263. prevents intruders from capturing what you did after you logged in.
  264.  
  265. There is a Kerberos FAQ at ftp at rtfm.mit.edu in
  266. /pub/usenet/comp.protocols/kerberos/Kerberos_Users__Frequently_Asked_Questions_1.11
  267.  
  268. -------------------------------------------------------------------------------
  269.  
  270. One time password technology
  271.  
  272. S/key and other one time password technology makes sniffing account information
  273. almost useless. S/key concept is having your remote host already know a
  274. password that is not going to go over insecure channels and when you connect,
  275. you get a challenge. You take the challenge information and password and plug
  276. it into an algorithm which generates the response that should get the same
  277. answer if the password is the same on the both sides. Therefore the password
  278. never goes over the network, nor is the same challenge used twice. Unlike
  279. SecureID or SNK, with S/key you do not share a secret with the host. S/key is
  280. available on ftp:thumper.bellcore.com:/pub/nmh/skey
  281.  
  282. Other one time password technology is card systems where each user gets a card
  283. that generates numbers that allow access to their account. Without the card, it
  284. is improbable to guess the numbers.
  285.  
  286. The following are companies that offer solutions that are provide better
  287. password authenication (ie, handheld password devices):
  288.  
  289. Secure Net Key (SNK)
  290.  
  291. Digital Pathways, Inc.
  292. 201 Ravendale Dr. Mountainview, Ca.
  293. 97703-5216 USA
  294.  
  295. Phone: 415-964-0707 Fax: (415) 961-7487
  296.  
  297. Secure ID
  298.  
  299. Security Dynamics,
  300. One Alewife Center
  301. Cambridge, MA 02140-2312
  302. USA Phone: 617-547-7820
  303. Fax: (617) 354-8836
  304. Secure ID uses time slots as authenication rather than challenge/response.
  305.  
  306. ArKey and OneTime Pass
  307.  
  308. Management Analytics
  309. PO Box 1480
  310. Hudson, OH 44236
  311. Email: fc@all.net
  312. Tel:US+216-686-0090 Fax: US+216-686-0092
  313.  
  314. OneTime Pass (OTP):
  315. This program provides unrestricted one-time pass codes on a user by user basis
  316. without any need for cryptographic protocols or hardware devices. The user
  317. takes a list of usable pass codes and scratches out each one as it is used. The
  318. system tracks usage, removing each passcode from the available list when it is
  319. used. Comes with a very small and fast password tester and password and pass
  320. phrase generation systems.
  321.  
  322. ArKey:
  323. This is the original Argued Key system that mutually authenticates users and
  324. systems to each other based on their common knowledge. No hardware necessary.
  325. Comes with a very small and fast password tester and password and pass phrase
  326. generation systems.
  327.  
  328. WatchWord and WatchWord II
  329.  
  330. Racal-Guardata
  331. 480 Spring Park Place
  332. Herndon, VA 22070
  333. 703-471-0892
  334. 1-800-521-6261 ext 217
  335.  
  336. CRYPTOCard
  337.  
  338. Arnold Consulting, Inc.
  339. 2530 Targhee Street, Madison, Wisconsin
  340. 53711-5491 U.S.A.
  341. Phone : 608-278-7700 Fax: 608-278-7701
  342. Email: Stephen.L.Arnold@Arnold.Com
  343. CRYPTOCard is a modern, SecureID-sized, SNK-compatible device.
  344.  
  345. SafeWord
  346.  
  347. Enigma Logic, Inc.
  348. 2151 Salvio #301
  349. Concord, CA 94520
  350. 510-827-5707 Fax: (510)827-2593
  351. For information about Enigma ftp to: ftp.netcom.com in directory
  352. /pub/sa/safeword
  353.  
  354. Secure Computing Corporation:
  355.  
  356. 2675 Long Lake Road
  357. Roseville, MN 55113
  358. Tel: (612) 628-2700
  359. Fax: (612) 628-2701
  360. debernar@sctc.com
  361.  
  362. -------------------------------------------------------------------------------
  363.  
  364. Non-promiscuous Interfaces
  365.  
  366. You can try to make sure that most IBM DOS compatible machines have interfaces
  367. that will not allow sniffing. Here is a list of cards that do not support
  368. promiscuous mode:
  369.  
  370. Test the interface for promiscuous mode by using the Gobbler. If you find a
  371. interface that does do promiscuous mode and it is listed here, please e-mail
  372. cklaus@iss.net so I can remove it ASAP.
  373.  
  374.      IBM Token-Ring Network PC Adapter
  375.      IBM Token-Ring Network PC Adapter II (short card)
  376.      IBM Token-Ring Network PC Adapter II (long card)
  377.      IBM Token-Ring Network 16/4 Adapter
  378.      IBM Token-Ring Network PC Adapter/A
  379.      IBM Token-Ring Network 16/4 Adapter/A
  380.      IBM Token-Ring Network 16/4 Busmaster Server Adapter/A
  381.  
  382. The following cards are rumoured to be unable to go into promiscuous mode, but
  383. that the veracity of those rumours is doubtful.
  384.  
  385.      Microdyne (Excelan) EXOS 205
  386.      Microdyne (Excelan) EXOS 205T
  387.      Microdyne (Excelan) EXOS 205T/16
  388.      Hewlett-Packard 27250A EtherTwist PC LAN Adapter Card/8
  389.      Hewlett-Packard 27245A EtherTwist PC LAN Adapter Card/8
  390.      Hewlett-Packard 27247A EtherTwist PC LAN Adapter Card/16
  391.      Hewlett-Packard 27248A EtherTwist EISA PC LAN Adapter Card/32
  392.      HP 27247B EtherTwist Adapter Card/16 TP Plus
  393.      HP 27252A EtherTwist Adapter Card/16 TP Plus
  394.      HP J2405A EtherTwist PC LAN Adapter NC/16 TP
  395.  
  396. Adapters based upon the TROPIC chipset generally do not support promiscuous
  397. mode. The TROPIC chipset is used in IBM's Token Ring adapters such as the 16/4
  398. adapter. Other vendors (notably 3Com) also supply TROPIC based adapters.
  399. TROPIC-based adapters do accept special EPROMs, however, that will allow them
  400. to go into promiscuous mode. However, when in promiscuous mode, these adapters
  401. will spit out a "Trace Tool Present" frame.
  402.  
  403. -------------------------------------------------------------------------------
  404.  
  405. Acknowledgements
  406.  
  407. I would like to thank the following people for the contribution to this FAQ
  408. that has helped to update and shape it:
  409.  
  410.    *  Padgett Peterson (padgett@tccslr.dnet.mmc.com)
  411.    *  Steven Bellovin (smb@research.att.com)
  412.    *  Wietse Venema (wietse@wzv.win.tue.nl)
  413.    *  Robert D. Graham (robg@NGC.COM)
  414.    *  Kevin Martinez (kevinm@beavis.qntm.com)
  415.    *  Frederick B. Cohen (fc@all.net)
  416.    *  James Bonfield (jkb@mrc-lmb.cam.ac.uk)
  417.    *  Marc Horowitz (marc@MIT.EDU)
  418.    *  Steve Edwards (steve@newline.com)
  419.    *  Andy Poling (Andy.Poling@jhu.edu)
  420.    *  Jeff Collyer (jeff@cnet-pnw.com)
  421.    *  Sara Gordon (sgordon@sun1.iusb.indiana.edu)
  422.  
  423. -------------------------------------------------------------------------------
  424.  
  425. Copyright
  426.  
  427. This paper is Copyright (c) 1994, 1995
  428.    by Christopher Klaus of Internet Security Systems, Inc.
  429.  
  430. Permission is hereby granted to give away free copies electronically. You may
  431. distribute, transfer, or spread this paper electronically. You may not pretend
  432. that you wrote it. This copyright notice must be maintained in any copy made.
  433. If you wish to reprint the whole or any part of this paper in any other medium
  434. (ie magazines, books, etc) excluding electronic medium, please ask the author
  435. for permission.
  436.  
  437. Disclaimer
  438.  
  439. The information within this paper may change without notice. Use of this
  440. information constitutes acceptance for use in an AS IS condition. There are NO
  441. warranties with regard to this information. In no event shall the author be
  442. liable for any damages whatsoever arising out of or in connection with the use
  443. or spread of this information. Any use of this information is at the user's own
  444. risk.
  445.  
  446. Address of Author
  447.  
  448. Please send suggestions, updates, and comments to:
  449. Christopher Klaus <cklaus@iss.net> of Internet Security Systems, Inc.
  450. <iss@iss.net>
  451.  
  452. Internet Security Systems, Inc.
  453.  
  454. Internet Security Systems, Inc, located in Atlanta, Ga., specializes in the
  455. developement of security scanning software tools. Its flagship product,
  456. Internet Scanner, is software that learns an organization's network and probes
  457. every device on that network for security holes. It is the most comprehensive
  458. "attack simulator" available, checking for over 100 security vulnerabilities.
  459.  
  460. -- 
  461.  
  462.